import { IPoint, IView } from './types'

export class Square {
  private _viewer?: IView
  private _color: string = ''
  private _point: IPoint = { x: 0, y: 0 }

  get viewer() {
    return this._viewer
  }

  set viewer(value) {
    this._viewer = value
    this._viewer && this._viewer.show()
  }

  get point() {
    return this._point
  }

  set point(value) {
    this._point = value
    this._viewer && this._viewer.show()
  }

  get color() {
    return this._color
  }

  set color(value) {
    this._color = value
  }
}
